#include <iostream>

using namespace std;

//1、创建学生数据类型：包括（姓名，年龄，分数）
struct student
{
    //成员列表

    //姓名
    string name;
    // 年龄
    int age;
    // 分数
    int score;
}s3;//顺便创建一个结构体变量

//2、通过学生类型创建具体学生


int main(void)
{
    // 2.1 struct student s1
    struct student s1;
    s1.name = "张三";
    s1.age = 22;
    s1.score = 499;
    cout << "姓名：" << s1.name << endl;
    cout << "年龄：" << s1.age << endl;
    cout << "成绩：" << s1.score << endl;

    // 2.2 struct student s2 = {……}
    struct student s2 =
    {
        "李四",
        22,
        380
    };
    cout << "姓名：" << s2.name << endl;
    cout << "年龄：" << s2.age << endl;
    cout << "成绩：" << s2.score << endl;
    // 2.3 在定义结构体时顺便创建结构体变量
    s3.name = "王五";
    s3.age = 22;
    s3.score = 290;
    cout << "姓名：" << s3.name << endl;
    cout << "年龄：" << s3.age << endl;
    cout << "成绩：" << s3.score << endl;
    return 0;
}